package yf.mall.vo.up;


import lombok.Data;

import java.util.Date;

import com.alibaba.excel.annotation.*;

import java.io.Serializable;



import yf.mall.entity.AppCoursePurchaseEntity;
import yf.mall.vo.AppCoursePurchaseVo;

                                        
/**
 * 课程购买记录表实体
 * 表名 app_course_purchase
 *
 * 
 * 
 * @date Sat Jul 29 17:36:10 CST 2023
 */
@Data
public class AppCoursePurchaseUp implements Serializable {
    @ExcelIgnore
    private static final long serialVersionUID = 1L;

                        //主键
            @ExcelProperty("主键")
            private Long id;
        
                        //用户id
            @ExcelProperty("用户id")
            private Long userId;
        
                        //激活状态：0未激活，1-已激活
            @ExcelProperty("激活状态：0未激活，1-已激活")
            private Integer activeStatus;
        
                        //激活code
            @ExcelProperty("激活code")
            private String activeCode;
        
                        //激活时间
            @ExcelProperty("激活时间")
            private Date activeTime;
        
                        //课程id
            @ExcelProperty("课程id")
            private Long courseId;
        
                        //购买订单id
            @ExcelProperty("购买订单id")
            private Long orderId;
        
                        //课程节数
            @ExcelProperty("课程节数")
            private Long shotCount;
        
                        //课程名称
            @ExcelProperty("课程名称")
            private String title;
        
                        //IMG-课程封面
            @ExcelProperty("IMG-课程封面")
            private String cover;
        
    
    public AppCoursePurchaseUp() {

    }

    public AppCoursePurchaseVo toVo() {

        AppCoursePurchaseEntity entity = new AppCoursePurchaseEntity();
            AppCoursePurchaseVo vo = new AppCoursePurchaseVo(entity);
                                    entity.setId(id);
            
                                    entity.setUserId(userId);
            
                                    entity.setActiveStatus(activeStatus);
            
                                    entity.setActiveCode(activeCode);
            
                                    entity.setActiveTime(activeTime);
            
                                    entity.setCourseId(courseId);
            
                                    entity.setOrderId(orderId);
            
                                    entity.setShotCount(shotCount);
            
                                    entity.setTitle(title);
            
                                    entity.setCover(cover);
            
        
        return  vo;
    }



}
